package com.lzy.websocket.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lzy.websocket.bean.User;
import com.lzy.websocket.mapper.UserMapper;
import com.lzy.websocket.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserMapper userMapper;

	@Override
	public List<User> getUsers(String user) {
		return userMapper.getAllUsers(user);
	}

	@Override
	public String getPasswordByName(String userName) {
		return userMapper.getUserByName(userName).getPassword();
	}

	@Override
	public User getUserByName(String userName) {
		return userMapper.getUserByName(userName);
	}

}
